<template>
  <div>
    <h1>{{ myEmail }}</h1>
    <h3>{{ email }}</h3>
  </div>
</template>

<script>
import { mapState } from 'vuex'

export default {
  name: 'KHLXGL',

  data() {
    return {}
  },
  computed: {
    ...mapState({
      myEmail: state => state.first.email
    }),
    // 下面两种语法，要在对应的module的对象里面，添加 namespaced: true,
    // ...mapState('first', ['email'])
    ...mapState('first', { email: state => state.email })
  },
  methods: {}
}
</script>

<style lang="less" scoped></style>
